package com.alumni_circle.mapper.me;

import com.alumni_circle.entity.me.UserApply;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author 龙小虬
 * @since 2020-07-06 22:11
 */

public interface UserApplyMapper extends BaseMapper<UserApply> {

    @Select("SELECT * FROM user_apply WHERE (id = concat('%',#{id},'%')) AND (`name` = concat('%',#{name},'%')) AND (email = concat('%',#{email},'%')) AND (pass = concat('%',#{pass},'%')) AND (phone = concat('%',#{phone},'%')) AND (role = concat('%',#{role},'%'))")
    List<UserApply> search(@Param("email")String email, @Param("role")String role, @Param("pass")String pass, @Param("id")String id, @Param("name")String name, @Param("phone")String phone);

}
